cmake_minimum_required(VERSION 3.10)

project(WorkDataManager)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_FLAGS "-g -Wall")

aux_source_directory(src SRC_CODE)
find_package(PkgConfig REQUIRED)
find_package(fmt REQUIRED)
find_package(sdbus-c++ REQUIRED)
find_package(yaml-cpp REQUIRED)
find_package(libpqxx REQUIRED)
find_package(PostgreSQL REQUIRED)

link_libraries(
  fmt
  rt
  pthread
  pqxx
  pq
  SDBusCpp::sdbus-c++
  yaml-cpp
)

include_directories(
  ../include
)

# add_executable(SQLAction_test
#   src/SQLAction.cpp
#   run/SQLAction_test.cpp
# )
#
# add_executable(FileManager_test
#   src/FileManager.cpp
#   run/FileManager_test.cpp
# )
#
# add_executable(dbusServer_test
#   run/dbusServer_test.cpp
#   src/dbusServer.cpp
# )
#
# add_executable(ConfigReader_test
#   run/ConfigReader_test.cpp
#   src/ConfigReader.cpp
# )
#
# add_executable(dbusClient_test
#   run/dbusClient_test.cpp
#   src/dbusClient.cpp
# )

add_executable(GetNextHandlePath
  run/GetNextHandlePath.cpp
  ${SRC_CODE}
)

add_executable(SetHandleFinish
  run/SetHandleFinish.cpp
  ${SRC_CODE}
)

add_executable(${PROJECT_NAME}
  run/main.cpp
  ${SRC_CODE}
)
